package com.sourny.service.a.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.logging.Logger;

/**
 * @author sourny.yang
 * @date 2018/3/30 16:39
 */
@RestController
public class HelloController {
    private Logger logger = Logger.getLogger("HelloController");
    @Value("${server.port}")
    private String port;

    @RequestMapping("hello")
    public String hello() {
        logger.info("this is Server");

        return "Hello World! This Port Is " + port;
    }
}
